package com.shujia.bigdata.student;

public class TeskThread {


    public static void main(String[] args) {

        //创建线程对象
        MyThread thread = new MyThread();
        Thread thread1 = new Thread(thread);

        //启动线程
        thread1.start();


        for (int i = 0; i < 10; i++) {
            System.out.println("main" + i);
        }


    }

}

class MyThread implements Runnable {
    @Override
    public void run() {

        for (int i = 0; i < 10; i++) {
            System.out.println("MyThread" + i);
        }
    }
}

